using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class TipPanel : BasePanel
{
    private Text text;
    private Button okBtn;
    public override void OnInit()
    {
        path = "Prefabs/TipPanel";
        layer = PanelManager.Layer.Tip;
    }
    public override void OnShow(params object[] para)
    {
        text = panel.transform.Find("Text").GetComponent<Text>();
        okBtn = panel.transform.Find("OkBtn").GetComponent<Button>();
        okBtn.onClick.AddListener(OnOkClick);
        if(para.Length == 1)
        {
            text.text = (string)para[0];
        } 
    }

    private void OnOkClick()
    {
        Close();
    }
}
